﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="DtCms.Web.test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    
     <script language="javascript" type="text/javascript">
         function ontc_small() {
             var url = 'window.aspx';
             var res = window.showModalDialog(url, {}, "dialogWidth=700px;dialogHeight=500px;status=no;scroll=no;resizable=yes");
             if (res != null) {
                 document.getElementById("txttitle").value = res[0];
                 //                 __doPostBack('PostBackFromClientControl1', '')

                 form1.submit();
                 
             } else {

             }
         }



         function ontc_big() {
             var url = 'window.aspx';
             var res = window.showModalDialog(url, {}, "dialogWidth=700px;dialogHeight=500px;status=no;scroll=no;resizable=yes");
             if (res != null) {
                 document.getElementById("txtproduct").value = res[0];
                 __doPostBack('PostBackFromClientControl1', '')

             } else {

             }
         }


 </script>
</head>
<body>
    <form id="form1" runat="server">
      <br />
      <br />
      <asp:TextBox ID="txttitle" runat="server" Width="324px"></asp:TextBox>
      <br />
      <br />
      <br />
      <INPUT type=button name="PostBackFromClientControl1"value='
    [使用Page. ClientScript对象方法]'onclick="__doPostBack
    ('PostBackFromClientControl1','')"><input id="Button1" type="button" value="选择" onclick="ontc_small();" /> 
    <div> 
        <input type="hidden" name="__EVENTTARGET" id="__
    EVENTTARGET" value="" /> 
        <input type="hidden" name="__EVENTARGUMENT" id="__
    EVENTARGUMENT" value="" /> 
      <asp:TextBox ID="txtproduct" runat="server" Width="324px"></asp:TextBox>
        <input id="Button2" type="button" value="选择" onclick="ontc_big();" /></div> 
    <script type="text/javascript"> 
        //<![CDATA[  
        var theForm = document.forms['form1'];  
        if (!theForm) {  
            theForm = document.form1;  
        }  
        function __doPostBack(eventTarget, eventArgument) {  
            if (!theForm.onsubmit || (theForm.onsubmit() != false)) {  
                theForm.__EVENTTARGET.value = eventTarget;  
                theForm.__EVENTARGUMENT.value = eventArgument;  
                theForm.submit();  
            }  
        }  
        //]]> 
    </script> 
    <asp:Button ID="btnadd" runat="server" Text="Button" onclick="btnadd_Click" />
    <p>
        <input id="Submit1" type="submit" value="submit" /></p>
    <p>
        <asp:Repeater ID="rp_list" runat="server">
        <ItemTemplate>
         <%#Eval("title") %>
        </ItemTemplate>
        </asp:Repeater>
      </p>
      <p>
        <asp:Repeater ID="rp_product" runat="server">
        <ItemTemplate>
         <%#Eval("title") %>
        </ItemTemplate>
        </asp:Repeater>
      </p>
      <asp:Button ID="Button3" runat="server" onclick="Button3_Click" Text="提交" />
    </form>
    </body>
</html>
